<!DOCTYPE html>
<html >
<head>
<meta charset="UTF-8"></meta>
<script type="text/javascript" src="/js/vue.js"></script>
<title>Vue.js</title>
</head>
<body>
	<h1>VUESET全局操作</h1>
	<hr></hr>
	<div id="app">
		{{data.count}}
		{{data.arr}}
		<ul>
			<li v-for="item in data.arr">{{item}}</li>
			<li v-for="item in list">{{item}}</li>
		</ul>
	</div>
	
	<p>
		<button onclick="add()">ADD</button>
	</p>
	
	<script type="text/javascript">
	
		function add(){
			//Vue.set改变数组的值（js限制了）
			Vue.set(outData.arr,1,'dd');
		}
	
		var outData = {
				count:1,
				goods:'car',
				arr:['aaa','bbb','ccc']
		}
		
		var app = new Vue({
			
			el:'#app',
			data:{
				data:outData,
				list:['aaa','bbb','ccc']
			}		
		});
	</script>
</body>
</html>